
CC = gcc
BASE_DIR =./
DEST_DIR = $(BASE_DIR)/bin

APP_NAME = timmod_unit_test
APP_SRC = timmod_test.c avdl_timmod.c
#APP_LIBS = smd_user_lib_new osal_linux_user timmod_psd_user

TARGET = $(DEST_DIR)
FULL_APP_LIBS = $(foreach lib, $(APP_LIBS), $(DEST_DIR)/lib/lib$(lib).a)

default: $(TARGET)


CFLAGS += -DLINUX 


$(TARGET): $(APP_NAME)
	sudo cp $< $@

$(APP_NAME): $(APP_SRC) $(FULL_APP_LIBS)
	$(CC) -g -Wall $(CFLAGS) $^ -o $@

clean: 
	rm -f $(APP_NAME)
	rm -f $(TARGET/)$(APP_NAME)
